load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "op",
    srcs = [
        "controller.go",
        "operation.go",
        "pq.go",
        "relocate_range.go",
        "transfer_lease.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvserver/asim/op",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/kv/kvserver",
        "//pkg/kv/kvserver/allocator",
        "//pkg/kv/kvserver/allocator/allocatorimpl",
        "//pkg/kv/kvserver/allocator/storepool",
        "//pkg/kv/kvserver/asim/config",
        "//pkg/kv/kvserver/asim/state",
        "//pkg/roachpb",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "op_test",
    srcs = ["controller_test.go"],
    embed = [":op"],
    deps = [
        "//pkg/kv/kvserver/allocator",
        "//pkg/kv/kvserver/allocator/allocatorimpl",
        "//pkg/kv/kvserver/asim/config",
        "//pkg/kv/kvserver/asim/gossip",
        "//pkg/kv/kvserver/asim/state",
        "//pkg/roachpb",
        "@com_github_stretchr_testify//require",
    ],
)
